(defun macro-make-function(&optional name)
  (interactive)
  (if (called-interactively-p 'any)
      (setq name (read-string "Macro name: "))
    (setq name (if name name "last-macro")))
  (setq function-string (pp-to-string (elmacro-make-defun (make-symbol (concat "macros/" name)) (elmacro-extract-last-macro elmacro-command-history))))
  (message function-string)
  (set-buffer (generate-new-buffer "*temporaryMacroBuffer*"))
  (erase-buffer)
  (insert function-string)
  (eval-buffer)
  (message function-string)
  (kill-buffer "*temporaryMacroBuffer*"))
